package app.socket;

public class Ticket extends Thread {
	private int num = 5; 

	public void run() {
		while (num > 0)
			System.out.println(Thread.currentThread().getName() + "...sale..." + num--);
	}
	
	public static void main(String[] args) {
		Ticket win1 = new Ticket();
		Ticket win2 = new Ticket();
		Ticket win3 = new Ticket();
		Ticket win4 = new Ticket();

		win1.start();
		win2.start();
		win3.start();
		win4.start();
	}
}
